const Sequelize = require('sequelize');
module.exports = function(sequelize, Sequelize) {
    return sequelize.define('user',{
        name: {
            type: Sequelize.STRING(256),
            allowNull: false,
            comment: "用户名"
        },
        wxUserAccount: {
            type: Sequelize.STRING(256),
            allowNull: false,
            unique: true,
            comment: "微信账号"
        },
        state: {
            type: Sequelize.BOOLEAN(false), 
            allowNull: false,
            comment: "在线状态"
        },
        barID: {
            type: Sequelize.INTEGER(8),
            allowNull: true,
            comment: "酒吧id"
        },
        tableNum: {
            type: Sequelize.INTEGER(8),
            allowNull: true,
            comment: "桌号"
        },
    });

};